<style>
    .pageFormContent dl.nowrap, .nowrap dl {
        width: 100%;
    }
    .pageFormContent dl.nowrap dd, .nowrap dd, .pageFormContent dt {
        width: auto;
    }
    .pageFormContent dt {
        font-weight: bolder;
    }
	.pageFormContent p{
		line-height:21px;
	}
</style>
<div class="pageContent">
    <div class="tabs" currentIndex="0" eventType="click">
        <div class="tabsHeader">
            <div class="tabsHeaderContent">
                <ul>
                    <li><a href="javascript:;"><span>委托单信息</span></a></li>
                    <li><a href="javascript:;"><span>原始单信息</span></a></li>
                </ul>
            </div>
        </div>
        <div class="tabsContent">
            <div>
            	<div class="pageFormContent" layouth="76" style="height:290px; overflow:auto;">
        <fieldset>
            <legend>订单基础信息</legend>
            <p>
                <label>订单编号：</label>
                {$order['sn']}
            </p>
            <p>
                <label>订单时间：</label>
                {$order['add_time']|date='Y-m-d H:i:s',###}
            </p>
            <p>
                <label>修改时间：</label>
                {if $order['mtime']}{$order['mtime']|date='Y-m-d H:i:s',###}{else}-{/if}
            </p>
            <p>
                <label>支付时间：</label>
                {if $order['pay_time']}{$order['pay_time']|date='Y-m-d H:i:s',###}{else}-{/if}
            </p>
            <p>
                <label>发货时间：</label>
                {if $order['shipping_time']}{$order['shipping_time']|date='Y-m-d H:i:s',###}{else}-{/if}
            </p>
            <p>
                <label>平台：</label>
                {$order['platform']}
            </p>
            <p>
                <label>下单IP：</label>
                {$order['add_ip']}
            </p>
        </fieldset>
        <fieldset>
            <legend>订单状态</legend>
            <p>
                <label>订单状态：</label>
                <php>echo $status[$order['status']];</php>
            </p>
            <p>
                <label>支付状态：</label>
                <php>echo $pay_status[$order['pay_status']];</php>
            </p>
            <p>
                <label>配送状态：</label>
				<php>echo $shipping_status[$order['shipping_status']]</php>
            </p>
        </fieldset>
        <fieldset>
            <legend>收货信息</legend>
			<p>
                <label>配送地址：</label>
				{if $order['ext']['entrust_addres']['value']==0}
				配送到客户地址
				{else}
				配送到新地址
				{/if}
            </p>
            <p>
                <label>收货人：</label>
				{$order['address']['consignee']}
            </p>
            <p>
                <label>收货地址：</label>
				{$Area[$order['address'][province]]['name']} - {$Area[$order['address'][city]]['name']} - {$Area[$order['address']['district']]['name']}&nbsp;{$order['address']['address']}
            </p>
            <p>
                <label>电话：</label>
				{if $order['address']['tel']}{$order['address']['tel']}{else} ---- {/if}
            </p>
            <p>
                <label>手机：</label>
				{$order['address']['mobile']}
            </p>
        </fieldset>
	
        <fieldset>
            <legend>采购单信息</legend>
            <div>
                <table class="table" width="98%" align="center">
                    <thead>
                    <tr>
                        <th width="15%" align="center">订单编号</th>
                        <th align="center">商品名称</th>
                        <th width="10%" align="center">单价</th>
                        <th width="10%" align="center">采购数量</th>
                        <th width="12%" align="center">CV</th>
                    </tr>
                    </thead>
                    <tbody>
                    <if condition="empty($order['goods'])">
                    <tr align="center">
                        <td colspan="5" style="padding:10px;border:0;color:#FB0000;" align="center">购物车为空!</td>
                    </tr>
                    <else/>
                    <volist name="order['goods']" id="vo">
                    <tr align="center">
                        <td height="30" style="border-left:none;"><a href="#" target="_blank">{$vo['product_psn']}</a></td>
                        <td>{$vo['product_name']}</td>
                        <td>{$vo['price']/100|number_format=###,2}</td>
                        <td>{$vo['number']}</td>
                        <td><span style="height:21px; line-height:21px;" class="count_price" id="count_price_{$vo['product_id']}">{$vo['priceall']/100|number_format=###,2}</span></td>
                    </tr>
                    </volist>
                    </if>
                    <tbody>
                    </table>
                </div>
                </fieldset>
				
                <fieldset>
                    <legend>订单结算信息</legend>
                    <dl class="nowrap">
                        <dt>订单结算</dt>
                        <dd>商品总额:{$order['amount']/100|number_format=###,2} CV 
                            <br/>
                            <php>
                            $order_amount=$order['amount'];//订单总金额
                            </php>
                            <volist name="order['finance']" id="f">
							{if $f['action']=='OOS'||$f['action']=='REFUND'}
                            <php>
                            	$order_amount-=$f['value']*$f['number'];
                            </php>
                            {/if} 
                            
                            {if $f['code'] !='refund' && $f['code'] !='spotprice' && $f['code'] !='clearing' && $f['code'] !='acceptcost'}
                            	{$f['remark']} | 数量: {$f['number']} | 价格：{$f['value']/100|number_format=###,2} {$f['subject']} <br/>
                            {/if}
                           
                            </volist>
                            <b style="font-size:16px;">小计：{$order_amount/100|number_format=###,2}</b>CV
                        </dd>
                    </dl>
                    <dl class="nowrap">
                    	<dt>优惠卷</dt>
                    	<dd>
                    		<volist name="coupondata" id="c">
                            	折扣科目： {$c['subject']} | 类型: {$c['type']} | 金额：{$c['value']} | 说明： {$c['content']}<br/>
                            </volist>
                    	</dd>
                    </dl>
					<dl class="nowrap">
                        <dt>实际支付</dt>
                        <dd><b style="font-size:16px;"><php>echo number_format($order_amount/100,2);</php></b>CV</dd>
                    </dl>
                    <dl class="nowrap">
                        <dt>操作记录</dt>
                        <dd>
                            <volist name="order['logs']" id="vo">
                            {$vo['open']}: {$vo['content']|nl2br}  --{$vo['user_id']} ({$vo['ctime']|date='Y-m-d H:i:s',###})
                            </volist>
                        </dd>
                    </dl>
                </fieldset>
            </div>
            </div><!-- tabs1 结束 -->
            <div><!-- tabs2 开始 -->
            	<div class="pageFormContent" layouth="76" style="height:290px; overflow:auto;">
					<fieldset>
            <legend>收货信息</legend>
            <p>
                <label>收货人：</label>
				{$order['address']['consignee']}
            </p>
            <p>
                <label>收货地址：</label>
				{$Area[$order['address'][province]]['name']} - {$Area[$order['address'][city]]['name']} - {$Area[$order['address']['district']]['name']}&nbsp;{$order['address']['address']}
            </p>
            <p>
                <label>电话：</label>
				{if $order['address']['tel']}{$order['address']['tel']}{else} ---- {/if}
            </p>
            <p>
                <label>手机：</label>
				{$order['address']['mobile']}
            </p>
        </fieldset>
	
        <fieldset>
            <legend>采购单信息</legend>
            <div>
                <table class="table" width="98%" align="center">
                    <thead>
                    <tr>
                        <th width="15%" align="center">订单编号</th>
                        <th align="center">商品名称</th>
                        <th width="10%" align="center">单价</th>
                        <th width="10%" align="center">采购数量</th>
                        <th width="12%" align="center">小计</th>
                    </tr>
                    </thead>
                    <tbody>
                    <if condition="empty($order['goods'])">
                    <tr align="center">
                        <td colspan="5" style="padding:10px;border:0;color:#FB0000;" align="center">购物车为空!</td>
                    </tr>
                    <else/>
                    <volist name="order['goods']" id="vo">
                    <tr align="center">
                        <td height="30" style="border-left:none;"><a href="#" target="_blank">{$vo['product_psn']}</a></td>
                        <td>{$vo['product_name']}</td>
                        <td>{$vo['saleprice']/100|number_format=###,2}</td>
                        <td>{$vo['salenumber']}</td>
                        <td><span style="height:21px; line-height:21px;" class="count_price" id="count_price_{$vo['product_id']}">{$vo['allsaleprice']/100|number_format=###,2}</span></td>
                    </tr>
                    </volist>
                    </if>
                    <tbody>
                    </table>
                </div>
                </fieldset>
				
                <fieldset>
                    <legend>订单结算信息</legend>
                    <dl class="nowrap">
                        <dt>订单结算</dt>
                        <dd>商品总额:{$order['ext']['amount']['value']/100|number_format=###,2} CV 
                            <br/>
                            <php>
                            $order_amount=$order['ext']['amount']['value'];//订单总金额
                            </php>
                            <volist name="order['finance']" id="f">
                            
                            {if $f['action']=='OOS'||$f['action']=='REFUND'}
                            <php>
                            	$order_amount-=$f['value']*$f['number'];
                            </php>
                            {/if} 
                            {if $f['code'] !='refund' && $f['code'] !='spotprice' && $f['code'] !='clearing' && $f['code'] !='acceptcost'}
                            {$f['remark']} | 数量: {$f['number']} | 价格：{$f['value']/100|number_format=###,2} {$f['subject']}<br/>
                            {/if}
                            
                            </volist>
                            <b style="font-size:16px;">小计：{$order_amount/100|number_format=###,2}</b>CV
                        </dd>
                    </dl>
                    
                    <dl class="nowrap">
                    	<dt>优惠卷</dt>
                    	<dd>
                    		<volist name="coupondata" id="c">
                            	折扣科目： {$c['subject']} | 类型: {$c['type']} | 金额：{$c['value']} | 说明： {$c['content']}<br/>
                            </volist>
                    	</dd>
                    </dl>
					<dl class="nowrap">
                        <dt>实际支付</dt>
                        <dd><b style="font-size:16px;"><php>echo number_format($order_amount/100,2);</php></b>CV</dd>
                    </dl>
                    <dl class="nowrap">
                        <dt>操作记录</dt>
                        <dd>
                            <volist name="order['logs']" id="vo">
                            {$vo['open']}: {$vo['content']|nl2br}  --{$vo['user_id']} ({$vo['ctime']|date='Y-m-d H:i:s',###})
                            </volist>
                        </dd>
                    </dl>
                </fieldset>
				</div>
            </div><!-- tabs2 结束 -->
        </div>
        <div class="tabsFooter">
            <div class="tabsFooterContent">
            </div>
        </div>
    </div>
</div>
